﻿using System;

namespace Safebrowsing
{
    /// <summary>
    /// Represents database status.
    /// </summary>
    internal class DatabaseStatus
    {
        /// <summary>
        /// Creates an instance of the DatabaseStatus
        /// </summary>
        /// <param name="schemaVersion"></param>
        /// <param name="lastVacuumTime"></param>
        /// <param name="lastReindexTime"></param>
        internal DatabaseStatus(string schemaVersion, DateTime lastVacuumTime, DateTime lastReindexTime)
        {
            SchemaVersion = schemaVersion;
            LastVacuumTime = lastVacuumTime;
            LastReindexTime = lastReindexTime;
        }

        /// <summary>
        /// Database schema version
        /// </summary>
        public string SchemaVersion { get; private set; }

        /// <summary>
        /// Last time when Vacuum was executed against the database
        /// </summary>
        public DateTime LastVacuumTime { get; private set; }

        /// <summary>
        /// Last time when Reindex was executed against the database
        /// </summary>
        public DateTime LastReindexTime { get; private set; }
    }
}
